import QtQuick 2.12
import QtQuick.Controls 2.15

Rectangle{
    id:titleButton
    //color: "#FFFFFF"
    anchors.top: parent.top
    anchors.verticalCenter: parent.verticalCenter
    
    property alias buttonName: settingText.text
    property alias buttonReleaseColor: titleButton.releaseColor
    property alias buttonPressGroundColor: titleButton.pressColor
    property alias buttonbackGroundColor: titleButton.btnBgColor
    property alias backGroundColor: titleButton.color
    property alias titleWidth: titleButton.width
    property alias titleHeight: titleButton.height
    
    
    property var settingNames:""
    property string pressColor: "black"
    property string releaseColor: "white"
    property string btnBgColor: "#63a0f1"
    signal clicked();
    
    
    Button{
        id:settings
        height: parent.height*0.75
        width: parent.width*0.95
        anchors.left: parent.left
        anchors.leftMargin: 25
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter
        background: Rectangle {
            color: titleButton.btnBgColor
            radius: 8
        }
        Text {
            id: settingText
            color: settings.down ? titleButton.pressColor : titleButton.releaseColor
            text: qsTr("无")
            font.pixelSize: 20
            font.family: siyuan.name
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
        }
        onClicked: titleButton.clicked()
    }
}
